/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticks.chromedome.subsystems;

import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Subsystem;
import ticks.chromedome.RobotMap;

/**
 *
 * @author Jared
 */
public class CameraLight extends Subsystem {
    private static CameraLight instance = null;
    private boolean cam;
    private Relay camera_light_relay;
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    public static CameraLight getInstance(){
        if(instance==null){
            instance = new CameraLight();
        }
        return instance;
    }
    
    private CameraLight(){
        camera_light_relay = new Relay(RobotMap.CAMERA_LIGHT_RELAY);
    }
    
    public void cameraLightOn(boolean state){
        cam = state;
        if(state==true){
            camera_light_relay.set(Relay.Value.kOn);
        }
        else{
            camera_light_relay.set(Relay.Value.kOff);
        }
    }
    public String debugCameraLight(){
        if(cam == true){
            return "Camera light is on.";
        }
        else{
            return "Camera light is off";
        }
    }
    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
}
